#!/bin/bash
# verify test

fname=f`date +%H%M%S`
mkdir $fname
nachos -x ../test/matmult > $fname/out1
if ! cat $fname/out1| grep -i '7220' > /dev/null
then echo "test matmult error \n" >> $fname/error; fi
nachos -x ../test/sort > $fname/out2
if ! cat $fname/out2| grep -i '1023' > /dev/null
then echo "test sort error \n" >> $fname/error; fi

#  for (( j=0; j < 12; j++))
#  do
#    cat $fname/out$i | grep -i "Group\ \[$j\]" >> $fname/resort$i
#    echo '\n' >> $fname/resort$i
#    if cat $fname/out$i|grep -i "Group\ \[$j\]" > /dev/null
#    then
#      if ! cat $fname/out$i|grep -i "Group\ \[$j\]\ is\ leaving\ TicketTaker" > /dev/null
#      then echo "test $i : group $j error ending" >> $fname/error; fi
#    fi
#  done
#done

